<!DOCTYPE html><!--HTML5 doctype-->
<html>
<head>
<title>Your New Application</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> 
<style type="text/css">
    /* Prevent copy paste for all elements except text fields */
    *  { -webkit-user-select:none; -webkit-tap-highlight-color:rgba(255, 255, 255, 0); }
    input, textarea  { -webkit-user-select:text; }
    
    /* Set up the page with a default background image */
    body {
        background-color:#fff;
        color:#000;
        font-family:Arial;
        font-size:36pt;
        margin:0px;padding:0px;
        background-image:url('images/background.jpg');

    }

    input[type=text], input[type=email], input[type=password] {
        font-size:24pt;
    } 

    button {
        font-size: 56px;
    }
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> 
<script type="text/javascript" charset="utf-8" src="_appMobi/appmobi_local_bootstrap.js"></script> 
<script type="text/javascript" charset="utf-8" src="http://localhost:58888/_appMobi/xhr.js"></script> 
<script type="text/javascript">
/* This function runs once the page is loaded, but appMobi is not yet active */
var init = function(){

};
window.addEventListener("load",init,false);  

/* This code prevents users from dragging the page */
var preventDefaultScroll = function(event) {
    event.preventDefault();
    window.scroll(0,0);
    return false;
};
document.addEventListener('touchmove', preventDefaultScroll, false);

/* This code is used to run as soon as appMobi activates */
var onDeviceReady=function(){
    //Size the display to 768px by 1024px
    AppMobi.display.useViewport(768,1024);
	
	//hide splash screen
	AppMobi.device.hideSplashScreen();	
};
document.addEventListener("appMobi.device.ready",onDeviceReady,false);   

$(document).ready(function(){
    //
    //  Logged in user don't see rego option 
    //
    if(IsNumeric(sessionStorage.userID))
    {
        $("h1").before("<p>" + sessionStorage.username + " <a id='logout' href='index.html'>LOGOUT</a></p>");
        $("#rego").remove();
        $("#login").remove();
    }
    else{
        $("#request").remove();
        $("#changePW").remove();
        $("#changeEmail").remove();
        $("#updateMedical").remove();
        $("#updateDetails").remove();
    }
    //
    //  Logout
    //
    $("#logout").click(function(){
        sessionStorage.username = "";
        sessionStorage.userID = "";
    });
}); 

function IsNumeric(n) {
    return !isNaN(parseFloat(n)) && isFinite(n);
}

</script>

</head>
    <body>
        <h1>Gluphien</h1>
        <a id="login" href="login.html">login</a>
        <br>
        <a id="rego" href="registration.html">account creation</a>
        <br>
        <a id="request" href="request.html">Request Doctor</a>
        <br>
        <a id="changePW" href="changePassword.html">Change Password</a>
        <br>
        <a id="changeEmail" href="changeEmail.html">Change Email</a>
        <br>
        <a id="updateMedical" href="updateMedicalInfo.html">Update Medical Details</a>
        <br>
    </body>
</html>
